package com.second.service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.second.model.pojo.FShop;

import java.util.ArrayList;
import java.util.List;

public interface IFShopService {

    //查询全部
    ArrayList<FShop> findAll();
    //根据id查询单个FShop
    FShop getById(Integer id);
    //降序排序为了推荐评分靠前的店铺
    List<FShop> orderByScoreDesc();


    //    店铺搜索
    PageInfo<FShop> search(String shopName,Integer pageNum,Integer pageSize);
    //    根据价格查询
    PageInfo<FShop> price(Double start,Double end,Integer pageNum,Integer pageSize);

   PageInfo<FShop> findByType(Integer type,Integer pageNum,Integer pageSize);


    PageInfo<FShop> findAllByArea(String area,Integer pageNum,Integer pageSize);

    PageInfo<FShop> findAllByShopScore(Integer pageNum,Integer pageSize);

    //保存店铺评分
    void saveScore(FShop shop,Double score);

    //根据ShopId查询店铺的具体位置 -- 高德坐标
    String coordinate(Integer id);

    //通过店铺类型查找
    List<FShop> findShopsByTypes(Integer type,Integer shopId);

    List<FShop> findByName(String shopName);
}
